<?php
require_once '../../core/fcCommon.php';
require_once '../../core/fcORM.php';

$json = getJsonFromRequest();

$obj = new Entity("some_table");
foreach($json as $key => $value){
    $obj->put($key, $value);
}

$conn = new Connection();
$res = $conn->find($obj);

$jsonRes = "";
foreach($res as $r){
    $jsonRes = $r->toJson();
    break;
}

echo $jsonRes;
?>
